package com.unknow.first.dapp.admin.account.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface AddressWithdrawMapper extends BaseMapper<AddressWithdraw> {
    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(AddressWithdraw record);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(AddressWithdraw record);

    int updateBatch(List<AddressWithdraw> list);

    int batchInsert(@Param("list") List<AddressWithdraw> list);

    /**
     * 更新订单审核通过
     *
     * @param id
     * @param remark
     * @return
     */
    int updateStatusAuditPass(@Param("id") Long id, @Param("signData") String signData, @Param("remark") String remark);

    /**
     * 更新订单审核拒绝
     * @param id
     * @param remark
     * @return
     */
    int updateStatusAuditRefuse(@Param("id") Long id, @Param("remark") String remark);

    /**
     * 更新状态为已完成
     *
     * @param orderNo
     * @param logId
     * @param hash
     * @param timestamp
     * @return
     */
    int updateStatusDoneByOrderNo(@Param("orderNo") String orderNo, @Param("logId") Long logId,
                                  @Param("hash") String hash, @Param("timestamp") Date timestamp);
}